<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>books</title>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" href="../static/css/bootstrap.min.css">
</head>
<body>
<div class="container">
    <h2 class="page-header">抖音账号列表</h2>
    <div class="alert alert-success alert-dismissable fade in" th:if="${(message)!=null}">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
        <strong>恭喜，</strong>
        <span th:text="${message}">信息提交成功</span>
    </div>
    <table class="table table-bordered table-striped table-hover">
        <thead>
        <tr>
            <th>#</th>
            <th>账号</th>
            <th>用户名</th>
            <th>签名</th>
            <th>作品数</th>
            <th>获赞数</th>
            <th>操作</th>
        </tr>
        <tr>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        <!--
        iterStat：
        count:计数 从1开始
        index:索引 从0开始
        size:列表总条数
        even/odd:偶数/奇数
        first/last:第一行、最后一行
        th:class="${iterStat.even}? 'bg-success'"
        -->

        <tr th:each="user,iterStat:${page.content}">
            <!--<td th:text="${iterStat.count}">1</td>-->
            <td th:text="${user.id}">1</td>
            <td th:text="${user.DouYinId}">1</td>
            <td th:text="${user.nickName}">书名</td>
            <!--<td><a href="#" th:text="${uid.b}" th:href="@{'/uids/'+ ${uid.b}}">书名</a></td>-->
            <!--
            th:href="@{/books/{id}(id=${book.id})}
            -->
            <td th:text="${user.sign}">作者</td>
            <td th:text="${user.works}">说明</td>
            <td th:text="${user.liked}">作品</td>
         <!--   <td th:switch="${uid.x}">
                <span th:case="0">想读</span>
                <span th:case="1">在读</span>
                <span th:case="2">已读</span>
                <span th:case="*">状态</span>
            </td>-->
            <td>
                <a href="#" th:href="@{/users/{id}/input(id=${user.id})}">更新</a>&nbsp;
                <a href="#" th:href="@{/users/{id}/delete(id=${user.id})}">删除</a>
            </td>
        </tr>
        </tbody>
    </table>
    <nav>
        <ul class="pager">
            <li class="previous"><a href="#" th:href="@{'/users/works?page='+${page.number-1}}" th:unless="${page.first}">上一页</a></li>
            <li class="next"><a href="#" th:href="@{'/users/works?page='+${page.number+1}}" th:unless="${page.last}">下一页</a></li>
        </ul>
    </nav>
</div>
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script th:src="@{/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js"></script>
</body>
</html>